package com.ruoyi.jkcrData.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.jkcrData.domain.plat.DataJkcrJzhl;
import com.ruoyi.jkcrData.mapper.DataJkcrJzhlMapper;
import com.ruoyi.jkcrData.service.IDataJkcrJzhlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.Future;


/**
 * 架空乘人静张力测试数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-19
 */
@Service
public class DataJkcrJzhlServiceImpl implements IDataJkcrJzhlService
{
    @Autowired(required = false)
    private DataJkcrJzhlMapper dataJkcrJzhlMapper;

    /**
     * 查询架空乘人静张力测试数据
     * 
     * @param jzhlId 架空乘人静张力测试数据主键
     * @return 架空乘人静张力测试数据
     */
    @Override
    public DataJkcrJzhl selectDataJkcrJzhlByJzhlId(Long jzhlId)
    {
        return dataJkcrJzhlMapper.selectDataJkcrJzhlByJzhlId(jzhlId);
    }

    /**
     * 根据dataTaskId获取数据
     *
     * @param dataTaskId
     */
    @Override
    public Future<List<DataJkcrJzhl>> selectDataJkcrJzhlByDataTaskId(Long dataTaskId) {
        return  new AsyncResult<>(dataJkcrJzhlMapper.selectDataJkcrJzhlByDataTaskId(dataTaskId));
    }

    /**
     * 查询架空乘人静张力测试数据列表
     * 
     * @param dataJkcrJzhl 架空乘人静张力测试数据
     * @return 架空乘人静张力测试数据
     */
    @Override
    public List<DataJkcrJzhl> selectDataJkcrJzhlList(DataJkcrJzhl dataJkcrJzhl)
    {
        return dataJkcrJzhlMapper.selectDataJkcrJzhlList(dataJkcrJzhl);
    }

    /**
     * 新增架空乘人静张力测试数据
     * 
     * @param dataJkcrJzhl 架空乘人静张力测试数据
     * @return 结果
     */
    @Override
    public int insertDataJkcrJzhl(DataJkcrJzhl dataJkcrJzhl)
    {
        dataJkcrJzhl.setCreateTime(DateUtils.getNowDate());
        return dataJkcrJzhlMapper.insertDataJkcrJzhl(dataJkcrJzhl);
    }

    /**
     * 批量新增架空乘人静张力测试数据
     *
     * @param dataJkcrJzhl
     */
    @Override
    public int batchDataJkcrJzhl(List<DataJkcrJzhl> dataJkcrJzhl) {
        return dataJkcrJzhlMapper.batchDataJkcrJzhl(dataJkcrJzhl);
    }

    /**
     * 修改架空乘人静张力测试数据
     * 
     * @param dataJkcrJzhl 架空乘人静张力测试数据
     * @return 结果
     */
    @Override
    public int updateDataJkcrJzhl(DataJkcrJzhl dataJkcrJzhl)
    {
        dataJkcrJzhl.setUpdateTime(DateUtils.getNowDate());
        return dataJkcrJzhlMapper.updateDataJkcrJzhl(dataJkcrJzhl);
    }

    /**
     * 变更数据状态
     *
     * @param dataTaskId
     * @return 结果
     */
    @Override
    public int updateDataJkcrJzhlByDataTaskId(Long dataTaskId) {
        return dataJkcrJzhlMapper.updateDataJkcrJzhlByDataTaskId(dataTaskId);
    }

    /**
     * 变更数据状态
     *
     * @param jzhlId
     * @return 结果
     */
    @Override
    public int updateDataJkcrJzhlByJzhlId(Long jzhlId) {
        return dataJkcrJzhlMapper.updateDataJkcrJzhlByJzhlId(jzhlId);
    }

    /**
     * 批量删除架空乘人静张力测试数据
     * 
     * @param jzhlIds 需要删除的架空乘人静张力测试数据主键
     * @return 结果
     */
    @Override
    public int deleteDataJkcrJzhlByJzhlIds(Long[] jzhlIds)
    {
        return dataJkcrJzhlMapper.deleteDataJkcrJzhlByJzhlIds(jzhlIds);
    }

    /**
     * 删除架空乘人静张力测试数据信息
     * 
     * @param jzhlId 架空乘人静张力测试数据主键
     * @return 结果
     */
    @Override
    public int deleteDataJkcrJzhlByJzhlId(Long jzhlId)
    {
        return dataJkcrJzhlMapper.deleteDataJkcrJzhlByJzhlId(jzhlId);
    }
}
